Search CustomTheme

The Search CustomTheme object contains settings to customize the content theme (added as a separate property) for embedded search. The custom theme can cover an entire set of theme settings, or override a selection of settings. The custom theme override property of searchEmbedOptions takes the customTheme object to dynamically inject the changes into the current visual.

The Search CustomTheme operates in an identical fashion to the embedded content CustomTheme object.

Using the Search CustomTheme Object

Constructors

  • There is NO constructor for the Search CustomTheme object
  • Search CustomTheme is made up of a collection of hierarchical properties (key-value pairs)

You do NOT need to supply the entire object - as settings will be adjusted for those properties supplied only.

To get a better sense of all the theme settings and options, see the theme editor in the admin.

Content Theme Object Groups

  • general – global font styles and icons
  • grid – context menu style and icons
  • visuals – smart insights dialog style
  • slicers – presentation specific styles, like the side menu

Nested Structure

The following code shows the ENTIRE Search CustomTheme structure with every property that can be set.

Setting Properties

The following shows how to set some of the properties. In general, they follow standard CSS rules and standard CSS settings.

To see specific examples for each property, see examples below.

Fonts

Set fonts using standard CSS font settings

"font": "Roboto, sans-serif"

"font-size": "12px"

Colors

Set colors using standard CSS HEX numbers, RGB or more complex background fills like gradients

"color": "#f0f0f0"

"color": hsla(30, 100%, 50%. 0.6)

"color": rgba(34, 12, 64, 0.6)

Examples

See the embedded content CustomTheme object examples for examples on using the Search CustomTheme